import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/api/securityUser/login',
    method: 'post',
    data
  })
}

export function getInfo(token) {
  return request({
    url: '/api/securityUser/info',
    method: 'post',
    data: { token }
  })
}

export function getSalt(userCode) {
  return request({
    url: '/api/securityUser/getSalt',
    method: 'post',
    data: {
      userCode
    }
  })
}

export function logout() {
  return request({
    url: '/api/securityUser/logout',
    method: 'post'
  })
}

export function getSecurityUserList() {
  return request({
    url: '/api/securityUser/getSecurityUserList',
    method: 'post'
  })
}

export function updateSecurityUser(data) {
  return request({
    url: '/api/securityUser/updateSecurityUser',
    method: 'post',
    data
  })
}

export function deleteSecurityUser(data) {
  return request({
    url: '/api/securityUser/deleteSecurityUser',
    method: 'post',
    data
  })
}

export function saveSecurityUser(data) {
  return request({
    url: '/api/securityUser/saveSecurityUser',
    method: 'post',
    data
  })
}

export function updateSecurityUserPassword(data) {
  return request({
    url: '/api/securityUser/updateSecurityUserPassword',
    method: 'post',
    data
  })
}
